package com.archermind.style.pojo;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

public enum IconTypeEnum {
    image(1),
    sprite_sheet(2);

    int value;

    IconTypeEnum(int value) {
        this.value = value;
    }

    public int getValue() {
        return value;
    }

    public static JSONArray getDict(){
        JSONArray array = new JSONArray();
        for(IconTypeEnum one: IconTypeEnum.values()){
            JSONObject obj = new JSONObject();
            obj.put("id",one.value);
            obj.put("name",one.name());
            array.add(obj);
        }
        return array;
    }
}
